class LoginModel {
  bool success;
  String msg;
  String code;
  Data data;
  Null attributes;

  LoginModel(
      {this.success, this.msg, this.code, this.data, this.attributes});

  LoginModel.fromJson(Map<String, dynamic> json) {
    success = json['success'];
    msg = json['msg'];
    code = json['code'];
    data = json['data'] != null ? new Data.fromJson(json['data']) : null;
    attributes = json['attributes'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['success'] = this.success;
    data['msg'] = this.msg;
    data['code'] = this.code;
    if (this.data != null) {
      data['data'] = this.data.toJson();
    }
    data['attributes'] = this.attributes;
    return data;
  }
}

class Data {
  String userCode;
  String userName;
  String schoolName;
  String authorization;
  SysRole sysRole;
  List<UserRoleList> userRoleList;
  List<ToolBarMenuInfo> toolBarMenuInfo;
  List<SettingBarMenuInfo> settingBarMenuInfo;
  List<TopMenuInfo> topMenuInfo;
  String firstChildMenuPath;
  MenuContainChild menuContainChild;

  Data(
      {this.userCode,
      this.userName,
      this.schoolName,
      this.authorization,
      this.sysRole,
      this.userRoleList,
      this.toolBarMenuInfo,
      this.settingBarMenuInfo,
      this.topMenuInfo,
      this.firstChildMenuPath,
      this.menuContainChild});

  Data.fromJson(Map<String, dynamic> json) {
    userCode = json['userCode'];
    userName = json['userName'];
    schoolName = json['schoolName'];
    authorization = json['Authorization'];
    sysRole =
        json['sysRole'] != null ? new SysRole.fromJson(json['sysRole']) : null;
    if (json['userRoleList'] != null) {
      userRoleList = new List<UserRoleList>();
      json['userRoleList'].forEach((v) {
        userRoleList.add(new UserRoleList.fromJson(v));
      });
    }
    if (json['toolBarMenuInfo'] != null) {
      toolBarMenuInfo = new List<ToolBarMenuInfo>();
      json['toolBarMenuInfo'].forEach((v) {
        toolBarMenuInfo.add(new ToolBarMenuInfo.fromJson(v));
      });
    }
    if (json['settingBarMenuInfo'] != null) {
      settingBarMenuInfo = new List<SettingBarMenuInfo>();
      json['settingBarMenuInfo'].forEach((v) {
        settingBarMenuInfo.add(new SettingBarMenuInfo.fromJson(v));
      });
    }
    if (json['topMenuInfo'] != null) {
      topMenuInfo = new List<TopMenuInfo>();
      json['topMenuInfo'].forEach((v) {
        topMenuInfo.add(new TopMenuInfo.fromJson(v));
      });
    }
    firstChildMenuPath = json['firstChildMenuPath'];
    menuContainChild = json['menuContainChild'] != null
        ? new MenuContainChild.fromJson(json['menuContainChild'])
        : null;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['userCode'] = this.userCode;
    data['userName'] = this.userName;
    data['schoolName'] = this.schoolName;
    data['Authorization'] = this.authorization;
    if (this.sysRole != null) {
      data['sysRole'] = this.sysRole.toJson();
    }
    if (this.userRoleList != null) {
      data['userRoleList'] = this.userRoleList.map((v) => v.toJson()).toList();
    }
    if (this.toolBarMenuInfo != null) {
      data['toolBarMenuInfo'] =
          this.toolBarMenuInfo.map((v) => v.toJson()).toList();
    }
    if (this.settingBarMenuInfo != null) {
      data['settingBarMenuInfo'] =
          this.settingBarMenuInfo.map((v) => v.toJson()).toList();
    }
    if (this.topMenuInfo != null) {
      data['topMenuInfo'] = this.topMenuInfo.map((v) => v.toJson()).toList();
    }
    data['firstChildMenuPath'] = this.firstChildMenuPath;
    if (this.menuContainChild != null) {
      data['menuContainChild'] = this.menuContainChild.toJson();
    }
    return data;
  }
}

class SysRole {
  String roleId;
  String roleName;

  SysRole({this.roleId, this.roleName});

  SysRole.fromJson(Map<String, dynamic> json) {
    roleId = json['roleId'];
    roleName = json['roleName'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['roleId'] = this.roleId;
    data['roleName'] = this.roleName;
    return data;
  }
}

class UserRoleList {
  String roleId;
  String roleName;

  UserRoleList({this.roleId, this.roleName});

  UserRoleList.fromJson(Map<String, dynamic> json) {
    roleId = json['roleId'];
    roleName = json['roleName'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['roleId'] = this.roleId;
    data['roleName'] = this.roleName;
    return data;
  }
}

class ToolBarMenuInfo {
  String value;
  String label;

  ToolBarMenuInfo({this.value, this.label});

  ToolBarMenuInfo.fromJson(Map<String, dynamic> json) {
    value = json['value'];
    label = json['label'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['value'] = this.value;
    data['label'] = this.label;
    return data;
  }
}

class SettingBarMenuInfo {
  String value;
  String label;

  SettingBarMenuInfo({this.value, this.label});

  SettingBarMenuInfo.fromJson(Map<String, dynamic> json) {
    value = json['value'];
    label = json['label'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['value'] = this.value;
    data['label'] = this.label;
    return data;
  }
}

class TopMenuInfo {
  String path;

  TopMenuInfo({this.path});

  TopMenuInfo.fromJson(Map<String, dynamic> json) {
    path = json['path'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['path'] = this.path;
    return data;
  }
}

class MenuContainChild {
  List<PerformanceStatistics> performanceStatistics;
  List<PerformanceIntroductionscore> performanceIntroductionscore;
  List<PerformancePerformancequery> performancePerformancequery;
  List<PerformanceHistoryquery> performanceHistoryquery;

  MenuContainChild(
      {this.performanceStatistics,
      this.performanceIntroductionscore,
      this.performancePerformancequery,
      this.performanceHistoryquery});

  MenuContainChild.fromJson(Map<String, dynamic> json) {
    if (json['/performance/statistics'] != null) {
      performanceStatistics = new List<PerformanceStatistics>();
      json['/performance/statistics'].forEach((v) {
        performanceStatistics.add(new PerformanceStatistics.fromJson(v));
      });
    }
    if (json['/performance/introductionscore'] != null) {
      performanceIntroductionscore = new List<PerformanceIntroductionscore>();
      json['/performance/introductionscore'].forEach((v) {
        performanceIntroductionscore
            .add(new PerformanceIntroductionscore.fromJson(v));
      });
    }
    if (json['/performance/performancequery'] != null) {
      performancePerformancequery = new List<PerformancePerformancequery>();
      json['/performance/performancequery'].forEach((v) {
        performancePerformancequery
            .add(new PerformancePerformancequery.fromJson(v));
      });
    }
    if (json['/performance/historyquery'] != null) {
      performanceHistoryquery = new List<PerformanceHistoryquery>();
      json['/performance/historyquery'].forEach((v) {
        performanceHistoryquery.add(new PerformanceHistoryquery.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.performanceStatistics != null) {
      data['/performance/statistics'] =
          this.performanceStatistics.map((v) => v.toJson()).toList();
    }
    if (this.performanceIntroductionscore != null) {
      data['/performance/introductionscore'] =
          this.performanceIntroductionscore.map((v) => v.toJson()).toList();
    }
    if (this.performancePerformancequery != null) {
      data['/performance/performancequery'] =
          this.performancePerformancequery.map((v) => v.toJson()).toList();
    }
    if (this.performanceHistoryquery != null) {
      data['/performance/historyquery'] =
          this.performanceHistoryquery.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class PerformanceStatistics {
  String name;
  String path;

  PerformanceStatistics({this.name, this.path});

  PerformanceStatistics.fromJson(Map<String, dynamic> json) {
    name = json['name'];
    path = json['path'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['name'] = this.name;
    data['path'] = this.path;
    return data;
  }
}

class PerformanceIntroductionscore {
  String name;
  String path;

  PerformanceIntroductionscore({this.name, this.path});

  PerformanceIntroductionscore.fromJson(Map<String, dynamic> json) {
    name = json['name'];
    path = json['path'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['name'] = this.name;
    data['path'] = this.path;
    return data;
  }
}

class PerformancePerformancequery {
  String name;
  String path;

  PerformancePerformancequery({this.name, this.path});

  PerformancePerformancequery.fromJson(Map<String, dynamic> json) {
    name = json['name'];
    path = json['path'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['name'] = this.name;
    data['path'] = this.path;
    return data;
  }
}

class PerformanceHistoryquery {
  String name;
  String path;

  PerformanceHistoryquery({this.name, this.path});

  PerformanceHistoryquery.fromJson(Map<String, dynamic> json) {
    name = json['name'];
    path = json['path'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['name'] = this.name;
    data['path'] = this.path;
    return data;
  }
}
